import url from "@/url.config"
export default ({ service, request, tools }) => ({
    Api_instruction(data) {
        //新增指令模版
        return request({
            url: url.ip1 + "/instruction/save",
            method: "post",
            data: data
        })
    },
    Api_editInstruction(data) {
        //修改指令模版
        return request({
            url: url.ip1 + "/instruction/edit",
            method: "put",
            data: data
        })
    },
    Api_instructionFindByPage(data) {
        //分页查询指令模版
        return request({
            url: url.ip1 + "/instruction/findByPage",
            method: "post",
            data: data
        })
    },
    Api_send(data) {
        //发送指令
        return request({
            url: url.ip1 + "/instruction/send",
            method: "post",
            data: data
        })
    },
    Api_delete(id) {
        //删除指令模版
        return request({
            url: url.ip1 + `/instruction/remove/${id}`,
            method: "delete",
        })
    },
    Api_instructionFindSendPage(data) {
        //查询发送的指令列表
        return request({
            url: url.ip1 + "/instruction/findSendPage",
            method: "post",
            data: data
        })
    },
    Api_instructionReply(data) {
        // 回复指令
        return request({
            url: url.ip1 + "/instruction/reply",
            method: "post",
            data: data
        })
    },
})